package com.lzy.product.apis.impl;

import com.lzy.product.apis.AgentPromoteServiceApi;
import com.lzy.product.dtos.agent.AgentPromoteDto;
import com.lzy.product.service.AgentPromoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by WIN7 on 2018/04/14.
 */
@Service
public class AgentPromoteServiceApiImpl implements AgentPromoteServiceApi {

    @Autowired
    AgentPromoteService agentPromoteService;

    @Override
    public Long insert(AgentPromoteDto dto) {
        return agentPromoteService.insert(dto);
    }

    @Override
    public Boolean update(AgentPromoteDto dto) {
        return agentPromoteService.update(dto);
    }

    @Override
    public Boolean delete(Long id) {
        return agentPromoteService.delete(id);
    }

    @Override
    public Boolean remove(Long id) {
        return agentPromoteService.remove(id);
    }

    @Override
    public AgentPromoteDto findById(Long id) {
        return agentPromoteService.findById(id);
    }

    @Override
    public List<AgentPromoteDto> query(AgentPromoteDto dto) {
        return agentPromoteService.query(dto);
    }

    @Override
    public Boolean deleteByProtocolId(Long protocolId) {
        return agentPromoteService.deleteByProtocolId(protocolId);
    }

    @Override
    public AgentPromoteDto queryByProtocolIdAndCriticalValue(Long protocolId, BigDecimal criticalValue) {
        return agentPromoteService.queryByProtocolIdAndCriticalValue(protocolId, criticalValue);
    }
}
